
<template>
  <div class="product-card">
    <img :src="product.image" :alt="product.name" class="product-image" />
    <div class="product-info">
      <h3 class="product-name">{{ product.name }}</h3>
      <p class="product-price">¥{{ product.price.toFixed(2) }}</p>
    </div>
  </div>
</template>

<script setup lang="ts">
interface Props {
  product: {
    id: number
    name: string
    price: number
    image: string
  }
  itemsPerRow: number
  containerWidth: number
}

defineProps<Props>()
</script>

<style scoped>
.product-card {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 12px;
  background: white;
  transition: transform 0.2s;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.product-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 4px;
}

.product-info {
  margin-top: 12px;
}

.product-name {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 8px 0;
}

.product-price {
  color: #e53935;
  font-size: 18px;
  font-weight: bold;
  margin: 0;
}
</style>